﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace csharp_dir
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.Write("input path: ");
            String input_path = Console.ReadLine();

            Console.Write("input filter: ");
            String input_filter = Console.ReadLine();

            String[] filePaths;

            if (input_filter.Equals(""))
            {
                input_filter = "*";
            }

            filePaths = Directory.GetFiles(input_path, input_filter, SearchOption.AllDirectories);
            foreach(String filePath in filePaths){
                Console.WriteLine(filePath);
            }

            Console.Write("press anykey...");
            Console.ReadKey();
        }
    }
}
